import fetch from 'common/src/utils/fetch';
export function listCourseScorePage(data) {
    return fetch({
        url:
            '/api/scoremanagementservice/courseScoreChange/listCourseScorePage',
        method: 'POST',
        data
    });
}
/**
 * @description: 选择培养层次后，查询课程类别数据
 * @param {trainingLevel  培养层次的key}
 * @return: 课程类别数据
 */
export function coursesLabelList(trainingLevel) {
    return fetch({
        url: '/api/cultureservice/coursesLabel/coursesLabelList?trainingLevel=' + trainingLevel,
        method: 'GET'
    });
}
// 学生申请变更
export function findStudentScoreById(data) {
    return fetch({
        url:
            '/api/scoremanagementservice/studentScoreChange/findStudentScoreById',
        method: 'GET',
        params: data
    });
}
// 提交课程变更申请
export function saveCourseScoreChange(data = {}) {
    return fetch({
        url:
            '/api/scoremanagementservice/courseScoreChange/saveCourseScoreChange',
        method: 'POST',
        data
    });
}

// 提交课程变更申请by校管理员
export function saveAndCommitCourseScoreChange(data = {}) {
    return fetch({
        url:
            '/api/scoremanagementservice/courseScoreChange/saveAndCommitCourseScoreChange',
        method: 'POST',
        data
    });
}
// 课程成绩变更申请基本信息
export function findTeachingClassById(data = {}) {
    return fetch({
        url:
            '/api/scoremanagementservice/courseScoreChange/findTeachingClassById',
        method: 'GET',
        params: data
    });
}
// 学生成绩变更申请基本信息By校管理员
export function findStudentScoreChangeById(id, changeId, status) {
    return fetch({
        url:
            '/api/scoremanagementservice/studentScoreChange/findStudentScoreChangeById?id=' +
            id +
            '&changeId=' +
            changeId +
            '&auditStatus=' +
            status,
        method: 'GET'
    });
}
// 课程成绩变更申请基本信息By校管理员
export function findCourseScoreChangeById(id, changeId) {
    return fetch({
        url:
            '/api/scoremanagementservice/courseScoreChange/findCourseScoreChangeById?id=' +
            id +
            '&changeId=' +
            changeId,
        method: 'GET'
    });
}
// 学生成绩变更获取
export function listStudentScoreChangePage(data = {}) {
    return fetch({
        url:
            '/api/scoremanagementservice/studentScoreChange/listStudentScoreChangePage',
        method: 'POST',
        data
    });
}
// 提交学生成绩变更
export function saveStudentScoreChange(data = {}) {
    return fetch({
        url:
            '/api/scoremanagementservice/studentScoreChange/saveStudentScoreChange',
        method: 'POST',
        data
    });
}
// 课程变更后查看详情
export function findApprovalInfo(id = '') {
    return fetch({
        url: '/api/scoremanagementservice/studentScoreChange/querySocreChangeFlowInfo',
        method: 'GET',
        params: {
            no: id
        }
    });
}

/**
 * 校管理员申请学生成绩变更
 * @param {*} data
 */
export function saveAndCommitScoreChange(data = {}) {
    return fetch({
        url:
            '/api/scoremanagementservice/studentScoreChange/saveAndCommitScoreChange',
        method: 'POST',
        data
    });
}
